{{!
  Copyright (c) HashiCorp, Inc.
  SPDX-License-Identifier: BUSL-1.1
}}

<PageHeader as |p|>
  <p.top>
    <KeyValueHeader
      @baseKey={{this.model}}
      @path="vault.cluster.secrets.backend"
      @root={{this.root}}
      @showCurrent={{true}}
    />
  </p.top>
  <p.levelLeft>
    <h1 class="title is-3" data-test-backend-configure-title={{this.model.type}}>
      Configure
      {{this.displayName}}
    </h1>
  </p.levelLeft>
</PageHeader>

<Toolbar>
  <ToolbarActions>
    <ToolbarLink @route="vault.cluster.secrets.backend" @model={{this.model.id}} data-test-backend-view-link>
      View backend
    </ToolbarLink>
  </ToolbarActions>
</Toolbar>

{{#if (eq this.model.type "ssh")}}
  <SecretEngine::ConfigureSsh @configForm={{this.model.configForm}} @id={{this.model.id}} />
  {{! This "else if" check is preventive. As of writing, all engines using this route, but "ssh", are wif engines }}
{{else if this.isWifEngine}}
  <SecretEngine::ConfigureWif
    @backendPath={{this.model.id}}
    @displayName={{this.displayName}}
    @type={{this.model.type}}
    @configForm={{this.model.configForm}}
  />
{{/if}}